/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package p1;

/**
 *
 * @author Derek Ward
 */
public class InterpretArgs 
{
    private     boolean     m_interactiveMode = false;
    private     String      m_dataFileName = null;
    private     String      m_problemFileName = null;
    
    public InterpretArgs(String[] args)
    {
        if ( args == null || args.length == 0 )
        {
            // We don't support 0 arguments
            // Throw IllegalArgumentException
            
            throw new IllegalArgumentException("No arguments specified!");
        }
        else if ( args.length == 1 )
        {
            m_interactiveMode = true;
            m_dataFileName = args[0];
        }
        else if ( args.length == 2 )
        {
            m_interactiveMode = false;
            m_dataFileName = args[0];
            m_problemFileName = args[1];
        }
        else
        {
            // Too many arguments!!!!
            
            throw new IllegalArgumentException("Too many arguments specified!");
        }
    }
    
    public String getDataFileName()
    {
        return m_dataFileName;
    }
    
    public String getProblemFileName()
    {
        return m_problemFileName;
    }
    
    public boolean getInteractiveModeSetting()
    {
        return m_interactiveMode;
    }
}
